<?php
use mdm\admin\components\MenuHelper;
use common\util\CommonUtil;
?>
<aside class="main-sidebar">

    <section class="sidebar">

        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="/images/admin/head.png" class="img-circle" alt="User Image"/>
            </div>
            <div class="pull-left info">
                <p><?php echo Yii::$app->user->identity->username;?></p>
                <i class="fa fa-circle text-success"></i> <?php echo CommonUtil::formatSimpleDate(time(),'Y-m-d H:i:s');?>
            </div>
        </div>

        <?php
        echo dmstr\widgets\Menu::widget( [
                'options' => ['class' => 'sidebar-menu'],
                'items' => MenuHelper::getAssignedMenu(Yii::$app->user->id),
        ] );
        ?>

    </section>

</aside>
